# print version

is_show = 0
version = """
easy_python 1.0
"""
if not is_show:
    print(version)

# import all pack that need

import pygame,sys

# init all resources list

all_img = {}
all_music = {}

# init all resources status

init_music_status = 0
init_status = 0
init_search = 0
first_search = 500,500

# init init function

def init_music():
    pygame.mixer.init()

def init_base(x,y):
    pygame.init()
    clock = pygame.time.Clock()
    screen = pygame.display.set_mode((x,y))


# init search function

def search(status):
    global init_status
    global init_music_status
    if not status:
        if init_status:
            if not init_search:
                raise Exception('you have not init the base')
            else:
                print('you have not init the base')
                init_status = 1
                init_base(first_search[0],first_search[1])
    else:
        if init_music_status:
            if not init_search:
                raise Exception('you have not init the sound')
            else:
                print('you have not init the sound')
                init_music_status = 1
                init_music()


# init all function

def load_img(name,thing):
    search(0)
    all_img[name] = pygame.image.load(thing)

def got_out():
    search(0)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()

def load_music(name,thing):
    search(0)
    search(1)
    all_music[name] = pygame.mixer.music.load(thing)


if __name__ == '__main__':
    while 1:
        got_out()